<%@ include file="../layout/taglib.jsp"%>
<html>
<head>
</head>

<body>
	<div class="content-top"  id="forum_detail">
	

			<div class="container section group">
				<div class="col span_2_of_contact">
					
					<div>
						  <span>
						      <a href="<%=request.getContextPath()%>/forum/index"><t:message code="add_new_topic"/></a>
						  </span>
					</div>
					<div class="">
						<table class="table table-striped" >
						<thead>
							<tr>
								<th><t:message code="title_forum"/></th>
								<th><t:message code="msg_forum"/></th>
								<th></th>
								<th></th>
							</tr>
                         </thead>
                         <tbody>
							<c:forEach items="${list_topic}" var="topic">
								<tr>
									<td>${topic.subject}</td>
									<td>${fn:substring(topic.description, 0, 50)}...</td>
									<td><a
										href="<%=request.getContextPath()%>/forum/topic_view?idt=${topic.idTopic}"><t:message code="view"/></a>
									</td>
									<td>
									  <c:if test="${topic.userOfTopic.idUser eq sessionScope.userFLogin.idUser}">
									     <a href="<%=request.getContextPath()%>/forum/delTopic/${topic.idTopic}/${page}">
									        <span class="glyphicon glyphicon-remove-sign">
											</span>
									     </a>
									  </c:if>
									</td>
								</tr>
							</c:forEach>
                           </tbody>
						</table>
						<div id="nav">
						  <p>
							<c:forEach begin="0" end="${nbPage-1}" var="p">
								<c:choose>
									
										<c:when test="${p eq page}">
	                                      <t:message code="page"/> ${p}
	                                    </c:when>
										
									    <c:otherwise>
										   <a href="<%=request.getContextPath()%>/forum/list_topic?page=${p}#nav"><t:message code="page"/> ${p}</a>
										</c:otherwise>
								    
								</c:choose>
                                   

							</c:forEach>
							</p>
						</div>
					</div>
				</div>
				<div class="col span_1_of_contact">
					<div class="company_address">
						<h3>Company Information :</h3>
						<p>500 Lorem Ipsum Dolor Sit,</p>
						<p>22-56-2-9 Sit Amet, Lorem,</p>
						<p>Phone:(00) 222 666 444</p>
						<p>Fax: (000) 000 00 00 0</p>
						<p>
							Email: <span>info[at]mycompany.com</span>
						</p>
						<p>
							Follow on: <span>Facebook</span>, <span>Twitter</span>
						</p>
					</div>
				</div>
				<div class="clear"></div>
			</div>
		
	</div>
</body>
</html>
